package com.xiaohao.server.parkmap.config;

import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WxMiniConfiguration {
    private static final String APPID = "wx8aecb8fe7483bc53";
    private static final String SECRET = "d0e1f65ea7c5ecd88b5c0a4061519768";

    @Bean
    public WxMaService wxService() {
        WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
        config.setAppid(APPID);
        config.setSecret(SECRET);
        WxMaServiceImpl wxMaService = new WxMaServiceImpl();
        wxMaService.setWxMaConfig(config);
        return wxMaService;
    }
}
